package com.example.gcmtest1;

import com.example.gcmtest1.httpserver.HTTPProxyService;
import com.example.gcmtest1.httpserver.WebServer;

import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;
import android.support.v4.app.NavUtils;

public class WebServer1 extends Activity {

	private String logName = "WebServer1";
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_web_server1);
        
        if (HTTPProxyService.ISRUNNING == false) {
        	Intent intent = new Intent(this, HTTPProxyService.class);
            this.startService(intent);
            
            Log.d(logName, "Try to start HTTPProxyService");
        } else {
        	Log.w(logName, "HTTPProxyService is already started");
        }
        
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_wev_server1, menu);
        return true;
    }

    
}
